import request from '@/utils/request'
//检测机构列表
export function jcjglist(query) {
	return request({
		url: '/forest/institution/list',
		method: 'get',
		params: query
	})
}
//检测机构详情
export function jcjgdetail(id) {
	return request({
		url: `/forest/institution/${id}`,
		method: 'get'
	})
}
//任务列表
export function rwlist(data) {
	return request({
		url: `/activiti/task/list`,
		method: 'get',
		data
	})
}
//获取审批行
export function formDataShow(id) {
	return request({
		url: `/activiti/task/formDataShow/${id}`,
		method: 'get'
	})
}
//获取任务信息
export function getTask(taskID) {
	return request({
		url: '/activiti/task/' + taskID,
		method: 'get'
	})
}
//审批
// 提交审批/办理表单
export function formDataSave(id, data) {
	return request({
		// endpoint expects task in path
		url: `/activiti/task/formDataSave/${id}`,
		method: 'post',
		data: data || {}
	})
}
//上传反馈意见
export function addIdea(data) {
	return request({
		url: `/forest/api/addIdea`,
		method: 'post',
		data
	})
}
//渲染表单
export function bdformDataShow(id) {
	return request({
		url: `/activiti/task/formDataShow/${id}`,
		method: 'GET'
	})
}
// 上传栽培技术
export function uploadCultivationPlan(data) {
	return request({
		url: `/forest/JjlSkill`,
		method: 'post',
		data
	})
}
// 查询任务的签收状态
export function getTaskSignStatus(id) {
	return request({
		url: `/activiti/task/claimed/${id}`,
		method: 'get'
	})
}
// 签收任务
export function signTask(id) {
	return request({
		url: `/activiti/task/claim/${id}`,
		method: 'post'
	})
}
// 获取课件信息
export function getCoursewareInfo(id) {
	return request({
		url: `/forest/JjlCourseware/task/${id}`,
		method: 'get'
	})
}
// 获取种植面积信息
export function getAcreageInfo(id) {
	return request({
		url: `/forest/JjlAcreage/task/${id}`,
		method: 'get'
	})
}
// 获取种植产量信息
export function getOutputInfo(id) {
	return request({
		url: `/forest/JjlOutput/task/${id}`,
		method: 'get'
	})
}
// 获取种植产值信息
export function getOutputValueInfo(id) {
	return request({
		url: `/forest/JjlOutputValue/task/${id}`,
		method: 'get'
	})
}
// 获取政策法规信息
export function getPolicyInfo(id) {
	return request({
		url: `/forest/JjlPolicyDepot/task/${id}`,
		method: 'get'
	})
}
// 获取栽培技术信息
export function getSkillInfo(id) {
	return request({
		url: `/forest/JjlSkill/task/${id}`,
		method: 'get'
	})
}
// 获取节庆活动信息
export function getEventInfo(id) {
	return request({
		url: `/forest/JjlActivity/task/${id}`,
		method: 'get'
	})
}
//产品监测任务列表
export function jiancelist() {
	return request({
		url: `/forest/monitorTask/list`,
		method: 'GET'
	})
}
//开启产品检测任务
export function monitorTask(data) {
	return request({
		url: `/forest/monitorTask`,
		method: 'POST',
		data
	})
}
//下发产品监测任务
export function assignMonitorTask(id, data) {
	return request({
		url: `/activiti/task/assignMonitorTask/${id}`,
		method: 'POST',
		data
	})
}
//产品检测任务详情
export function monitorTaskdetail(id) {
	return request({
		url: `/forest/monitorTask/id`,
		data: {
			id
		}
	})
}
//省级编辑产品检测任务
export function provicemonitorTaskdetail(data) {
	return request({
		url: `/forest/monitorTask`,
		method: 'put',
		data
	})
}
//市级编辑产品检测任务
export function shimonitorTaskdetail(data) {
	return request({
		url: `/forest/monitorTask/edit`,
		method: 'put',
		data
	})
}
//签收
export function checkMonitorTask(id, data) {
	return request({
		url: `/activiti/task/checkMonitorTask/${id}`,
		method: 'POST',
		data
	})
}
//抽样单、检测单列表
export function getcyList(data) {
	return request({
		url: `/forest/sampleInfo/getList`,
		data
	})
}
//抽样单、检测单详情
export function chouyangdetail(data) {
	return request({
		url: `/forest/sampleInfo/id`,
		data
	})
}
//编辑抽样单、检测单
export function exitchouyang(data) {
	return request({
		url: `/forest/sampleInfo/exit`,
		method: 'PUT',
		data
	})
}
//监测管理列表
export function jclist() {
	return request({
		url: `/forest/fastDetectionTask/list`
	})
}
//查询电子通知列表
export function noticelist(data) {
	return request({
		url: `/activiti/notice/list`,
		data
	})
}
//导出电子通知列表
export function exportnoticelist() {
	return request({
		url: `/activiti/notice/export`,
		method: 'post'
	})
}
//获取电子通知详细信息
export function getnoticedetail(noticeId) {
	return request({
		url: `/activiti/notice/${noticeId}`
	})
}
//修改电子通知
export function editnoticedetail(data) {
	return request({
		url: `/activiti/notice`,
		method: 'PUT',
		data
	})
}
//删除电子通知
export function delnoticedetail(noticeId) {
	return request({
		url: `/activiti/notice/${noticeId}`,
		method: 'DELETE'
	})
}
//新增电子通知
export function postnoticedetail(data) {
	return request({
		url: `/activiti/notice`,
		method: 'POST',
		data
	})
}
//shu
export function deptTree() {
	return request({
		url: `/system/user/deptTree`
	})
}
//树右
export function sylist(data) {
	return request({
		url: `/system/user/list`,
		data
	})
}

//获取接收人
export function getjsr(id) {
	return request({
		url: `/activiti/receive/list?noticeId=${id}`
	})
}
//查询抽样单列表
export function cyjclist(data) {
	return request({
		url: `/forest//sampleInfo/list`,
		data
	})
}
//查询土壤监测任务列表
export function trjclist(data) {
	return request({
		url: `/forest/soilMonitorTask/list`,
		data
	})
}
//新增土壤监测任务
export function soilMonitorTask(data) {
	return request({
		url: `/forest/soilMonitorTask`,
		method: 'POST',
		data
	})
}
//生成土壤监测任务表
export function generateTaskTable(data) {
	return request({
		url: `/forest/soilMonitorTask/generateTaskTable`,
		method: 'POST',
		data
	})
}
//删除土壤监测任务
export function delsoilMonitorTask(id) {
	return request({
		url: `/forest/soilMonitorTask/${id}`,
		method: 'DELETE'
	})
}
//获取土壤监测任务详细信息
export function soilMonitorTaskdetail(id) {
	return request({
		url: `/forest/soilMonitorTask/${id}`
	})
}
//编辑土壤监测任务
export function monitorTaskedit(data) {
	return request({
		url: `/forest/soilMonitorTask`,
		method: 'PUT',
		data
	})
}
//土壤签收
export function claim(id) {
	return request({
		url: `/activiti/task/claim/${id}`,
		method: 'post'
	})
}
//市检测机构签收完成
export function complete(taskID) {
	return request({
		url: '/activiti/task/complete/' + taskID,
		method: 'post'
	})
}
//查询土壤抽样单列表（全部）
export function trcylistAll(data) {
	return request({
		url: '/forest/syl/soil/sampling/listAll',
		data
	})
}
//获取土壤抽样单详细信息
export function trcydetail(id) {
	return request({
		url: `/forest/syl/soil/sampling/${id}`
	})
}
//修改抽样单
export function editcy(data) {
	return request({
		url: `/forest/syl/soil/sampling`,
		method: 'PUT',
		data
	})
}
//提交抽样单
export function commitSampling(data) {
	return request({
		url: `/activiti/soilMonitorSamplingTask/commit`,
		method: 'PUT',
		data
	})
}
// 土壤代办任务列表
export function soilMonitorTaskList(data) {
	return request({
		url: `/activiti/task/list`,
		method: 'get',
		data
	})
}
// 查询抽样单列表
export function choujianlist(data) {
	return request({
		url: `/forest/sampleInfo/list`,
		method: 'get',
		data
	})
}